package com.example.mall.user.api.service;

import com.example.mall.user.api.entity.ShopUser;
import com.example.mall.util.PageQueryUtil;
import com.example.mall.util.PageResult;
import com.example.mall.vo.ShopUserVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "mall-user-core")
public interface ShopUserService {

    @PostMapping("/shopUser/getShopUsersPage")
    PageResult getShopUsersPage(@RequestBody PageQueryUtil pageUtil);

    @PostMapping("/shopUser/register")
    String register(@RequestParam("loginName") String loginName, @RequestParam("password") String password);

    @PostMapping("/shopUser/info")
    ShopUserVo updateShopUserInfo(@RequestBody ShopUser shopUser);

    @PostMapping("/shopUser/lockShopUsers")
    Boolean lockShopUsers(@RequestParam("ids") Integer[] ids, @RequestParam("lockStatus") int lockStatus);

    @PostMapping("/shopUser/selectByLoginNameAndPassword")
    ShopUser selectByLoginNameAndPassword(@RequestParam("loginName") String loginName, @RequestParam("password") String password);
}
